#include "stdlib.h"
#include "stdio.h"
#include "string.h"

//结构体的定义

//这个定义了一个数据类型，没有分配内存。 
////捆绑分配，捆绑释放
//内存四自己对齐
//用typedef重I命名
//结构体的定义
typedef struct _Teacher
{
	char name[64]; 
	char *tile;
	int age;
}Teacher ;

Teacher *creatTArray(int num)
{
	int i = 0;
	Teacher *tArray = NULL;
	tArray = (Teacher *)malloc(num * sizeof(Teacher));
	if (tArray == NULL)
	{
		return NULL;
	}

	for (i=0; i<num; i++)
	{
		tArray[i].tile = (char *)malloc(100);
	}
	return tArray;
}



void main()
{

	int ret = 0;
	Teacher *pArray = NULL;

	pArray = creatTArray(3);
	if (pArray == NULL)
	{
		return ;
	}

	system("pause");
}
